home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / Programs / Ipswitch.IMail.Server.Pro.8.0.Winall / IMail8ec.exe / data1.cab / Web_Calendar / yearlist.cgi < prev    next >
Encoding:
Text File  |  2003-05-07  |  2.2 KB  |  87 lines

  1. //---------------- Function to create the list of year -------------------
  2. function getYearList()
  3. {
  4.     var s_year, e_year;
  5.     s_year = 1970;  // <!--ICAL.StartYear-->;
  6.     e_year = 2037;  // <!--ICAL.EndYear-->;
  7.     for (;s_year <= e_year; s_year++) 
  8.     {
  9.         document.write("<OPTION VALUE="+s_year+">"+s_year+"</OPTION>");
  10.     }
  11. }
  12.  
  13. //---------------- Function to create the list of month ------------------
  14. var arrMonth = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
  15. function getMonthList()
  16. {
  17.     for(i=0; i<arrMonth.length; i++)
  18.     {
  19.         var j = i + 1;
  20.         if(j<10)
  21.             document.write("<OPTION VALUE= 0"+j+">"+arrMonth[i]+"</OPTION>");
  22.         else
  23.             document.write("<OPTION VALUE="+j+">"+arrMonth[i]+"</OPTION>");
  24.     }
  25. }
  26.  
  27. //---------------- Function to create the list of days -------------------
  28. function getDaysList()
  29. {
  30.     for (i=0; i<31; i++)
  31.     {
  32.         var j = i + 1;
  33.         if(j<10)
  34.             document.write("<OPTION VALUE= 0"+j+">"+j+"</OPTION>");
  35.         else
  36.             document.write("<OPTION VALUE="+j+">"+j+"</OPTION>");
  37.     }
  38. }
  39.  
  40. //---------------- Function to create the list of hours ------------------
  41. function getHourList()
  42. {
  43.     var clkHours="<!--ICAL.GetHourClock-->";
  44.     if(clkHours == "24")
  45.     {
  46.         for(i=0; i<24; i++)
  47.         {
  48.             if(i<10)
  49.                 document.write("<OPTION VALUE= 0"+i+">"+i+"</OPTION>");
  50.             else
  51.                 document.write("<OPTION VALUE="+i+">"+i+"</OPTION>");
  52.         }
  53.     }
  54.     else if(clkHours == "12")
  55.     {
  56.         for(i=0; i<12; i++)
  57.         {
  58.             var j = i + 1;
  59.             if(j<10)
  60.                 document.write("<OPTION VALUE= 0"+j+">"+j+"</OPTION>");
  61.             else
  62.                 document.write("<OPTION VALUE="+j+">"+j+"</OPTION>");
  63.         }
  64.     }
  65. }
  66.  
  67. //---------------- Function to create the list of minutes ----------------
  68. function getMinuteList()
  69. {
  70.     arr_minute = new Array("00","05","10","15","30","45");
  71.     for(i=0; i<arr_minute.length; i++)
  72.     {
  73.         document.write("<OPTION VALUE="+arr_minute[i]+">"+arr_minute[i]+"</OPTION>");
  74.     }
  75. }
  76.  
  77. //---------------- Function to create the list of hours for reminder -----
  78. function getRemHourList()
  79. {
  80.     for(i=0; i<24; i++)
  81.     {
  82.         if(i<10)
  83.             document.write("<OPTION VALUE= 0"+i+">"+i+"</OPTION>");
  84.         else
  85.             document.write("<OPTION VALUE="+i+">"+i+"</OPTION>");
  86.     }
  87. }